Skip to content

Conversation

@j-rossi-nl
Copy link
Contributor

What does this PR do?

Fixes #5990
Follows #5995 (closed because stale).
Merges all commits from master.

  • accomodate iterable dataset without predefined length
  • set it as 1 use case: provide max_steps, and NO num_epochs
  • Is a merge of master and PR 5995
  • This PR fixes a typo or improves the docs (you can dimiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to the it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@sgugger

* accomodate iterable dataset without predefined length
* set it as 1 use case: provide max_steps, and NO num_epochs
* Is a merge of master and PR 5995
* fix only for torch
* TF trainer untouched
* trainer tests are skipped when no torch
@j-rossi-nl

This comment has been minimized.

@j-rossi-nl

This comment has been minimized.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. There are a few things I'd like to adjust, on the error messages especially. Or the comments in the tests.

In general, please limit your PR to the functionality you are adding. We can discuss unrelated changes to other parts of the code in separate PRs but it makes reviewing less efficient if you try to group them together.

@j-rossi-nl j-rossi-nl requested a review from sgugger October 18, 2020 10:22
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing most of the items in the review. I still disagree with your changes in the test file, which makes reusing the RegressionDataset for other frameworks impossible (and is unrelated to the feature you are trying to implement).

* unnecessary inheritance
* RegressionDataset implements all needed methods __len__ and __getitem__
@j-rossi-nl j-rossi-nl requested a review from sgugger October 19, 2020 15:04
* was wrongly under is_torch_available()
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sgugger sgugger merged commit a09fe14 into huggingface:master Oct 19, 2020
@sgugger
Copy link
Collaborator

sgugger commented Oct 19, 2020

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trainer: exception raised when calling len() on IterableDataset

3 participants